home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / c / bc_ti.zip / TI648.ASC < prev    next >
Text File  |  1992-02-25  |  1KB  |  67 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Borland C++                            NUMBER  :  648
  9.   VERSION  :  2.0
  10.        OS  :  PC DOS
  11.      DATE  :  February 25, 1992                        PAGE  :  1/1
  12.  
  13.     TITLE  :  Common Causes of General Protection Faults in TDW
  14.  
  15.  
  16.  
  17.  
  18.   The following are common  causes  for  General  Protection faults
  19.   while debugging a Windows application  under  Turbo  Debugger for
  20.   Windows (TDW.EXE):
  21.  
  22.     a) ram has called a Windows API function with incorrect arguments.
  23.        For example, passing WndProc a handle which is invalid.
  24.  
  25.     b) The segment part of a pointer the program is using is invalid.
  26.        In protected mode it is an index into the selector table which
  27.        has the actual segment address.  If that index references a spot
  28.        in the table which it shouldn't, or goes outside the bounds of
  29.        the table, it can cause a GP.
  30.  
  31.     c) The user's WndProc function uses a handle between function calls
  32.        which has not been declared static, so the value has changed.
  33.  
  34.     d) The CreateWindow API function calls your WndProc function with 3
  35.        messages.  If WndProc is not debugged, it can cause problems
  36.        (like a GP).
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.